<?php
namespace app\admin\controller;
/**
 * 仪器控制器
 */
class Consume extends AdminBase
{
    
    /**
     * 仪器列表
     */
    public function consumeList()
    {
        
        $this->assign('list', $this->logicConsume->getConsumeList());
        
        return $this->fetch('consume_list');
    }
    
    /**
     * 仪器添加
     */
    public function consumeAdd()
    {
        
        IS_POST && $this->jump($this->logicConsume->consumeEdit($this->param));
        
        return $this->fetch('consume_edit');
    }
    
    /**
     * 仪器编辑
     */
    public function consumeEdit()
    {
        
        IS_POST && $this->jump($this->logicConsume->consumeEdit($this->param));
        
        $info = $this->logicConsume->getConsumeInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('consume_edit');
    }
    
    /**
     * 仪器删除
     */
    public function consumeDel($id = 0)
    {
        
        $this->jump($this->logicConsume->consumeDel(['id' => $id]));
    }
}